#include "GameCursor.h"
#include "../Muzzy A Wrappers/D3DManager.h"
#include "../Muzzy A Wrappers/TextureManager.h"
#include "../Muzzy A Wrappers/DirectInput.h"


GameCursor::GameCursor(void)
{
	wndWidth = D3DManager::getInstance()->getWndWidth();
	wndHeight = D3DManager::getInstance()->getWndHeight();
	position = Vector2(wndWidth*.5f,wndHeight*.5f);

	SetRect(&windowRect,0,0,wndWidth,wndHeight);

	input = DirectInput::getInstance();
	textureManager = TextureManager::getInstance();
	
	textureID = NOID;
	speed = 1;
}


GameCursor::~GameCursor(void)
{
}

GameCursor* GameCursor::getInstance()
{
	static GameCursor instance;
	return &instance;
}

void GameCursor::Render()
{
	if(textureID != NOID)
		textureManager->Draw(textureID,position);
}

void GameCursor::Update()
{
	position += speed*input->MouseDelta();
}
